#include <boost/test/included/unit_test.hpp>
#include "status.h"

void test_status() {
	// general status
	std::string text = "Am I a good person?";
	Status status(text);
	BOOST_CHECK_EQUAL(status.GetDescription(), text);
	std::cout << status;
	
	// success status
	status = Status::Success();
	BOOST_CHECK_EQUAL(status.GetDescription(), "success");
	BOOST_CHECK_EQUAL(status.IsOk(), true);
	
	// Open file error
	status = Status::OpenFileFail();
	BOOST_CHECK_EQUAL(status.GetDescription(), "open file fail");
	BOOST_CHECK_EQUAL(status.IsOk(), false);
	
	// Fatal error
	status = Status::FatalError();
	BOOST_CHECK_EQUAL(status.GetDescription(), "fatal error");
	BOOST_CHECK_EQUAL(status.IsOk(), false);
}